<template>
  <div>
    <button @click="setNum(-1)">-</button><input :value="value" type="text"><button @click="setNum(1)">+</button>
  </div>
</template>
<script>
export default {
  name: 'HmNum',
  props: {
    value: {
      type: Number,
      default: 1
    }
  },
  data() {
    return {}
  },
  computed: {},
  created() {},
  methods: {
    setNum(step) {
      this.$emit('input', this.value + step)
    }
  }
}
</script>
<style lang="less" scoped></style>
